package com.yutao;

/**
 * @author : 余涛
 * @version : 1.0
 * @date : 2022/9/13 19:57
 */
public class StrategyTest {
    public static void main(String[] args) {
        String exp = "2+8";
        ICalculator cal = new Plus();
        System.out.println(cal.calculate(exp));

        String exp1 = "2-8";
        ICalculator cal1 = new Minus();
        System.out.println(cal1.calculate(exp1));

        String exp2 = "2*8";
        ICalculator cal2 = new Multiply();
        System.out.println(cal2.calculate(exp2));
    }
}
